using System;
using System.Collections.Generic;
using System.ComponentModel;

using System.Drawing;
using System.Text;
using System.Windows.Forms;
using CodePlex.SpaceBlock;

namespace CodePlex.SpaceBlock.UI.Controls
{
    public partial class MetadataControl : CodePlex.SpaceBlock.UI.Controls.BaseControl
    {
        public MetadataControl()
        {
            InitializeComponent();
        }

        public Metadata Metadata
        {
            get
            {
                return ((MetadataDescriptor)_grid.SelectedObject).Metadata;
            }
            set
            {
                if (value == null)
                {
                    _grid.SelectedObject = null;
                }
                else
                {
                    _grid.SelectedObject = new MetadataDescriptor(value);
                }
            }
        }
    }
}

